<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
          name='viewport'/>
    <title>马思特奥赛培训学校网络管理系统</title>
    <link rel="stylesheet" type="text/css" th:href="@{/webjars/bootstrap/3.3.7/css/bootstrap.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/asserts/css/demo.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/asserts/css/ready.css}">

    <style>
        table tr {
            height: 40px;
        }

        table tr td {
            text-align: center;
        }
    </style>
</head>
<body>

<div class="wrapper">
    <!--    引入公共页面 public-index。html 的模块-->
    <div th:replace="teacher/public-teacher-index :: header"></div>
    <div th:replace="teacher/public-teacher-index :: left"></div>

    <div class="main-panel">
        <div class="content">
            <div class="row">
                <!--<div class="col-md-1"></div>-->
                <table style="background-color:white" class="table table-bordered table-hover">
                    <tr class="danger">
                        <td width="100"><strong>提交者</strong></td>
                        <td width="100"><strong>发布人</strong></td>
                        <td width="100"><strong>作业名(点击即可在线预览)</strong></td>
                        <td width="150"><strong>上传时间</strong></td>
                        <td width="250"><strong>文件链接</strong></td>
                        <td width="100"><strong>成绩</strong></td>
                        <td width="100"><strong>操作</strong></td>
                    </tr>
                    <tr th:each="file : ${allFiles}">
                        <td width="100" th:text="${file.studentName}"></td>
                        <td width="100" th:text="${file.teacherName}"></td>
                        <td width="250">
                            <a th:text="${file.projectName}" th:href="${file.lookOnline}"></a></td>
                        <td width="150" th:text="${file.time}"></td>
                        <td width="100">
                            <a th:href="${file.url}" th:text="点击下载"></a></td>
                        <td width="100" th:text="${file.score}"></td>
                        <td width="100">
                            <a th:href="@{/teacher/addScore(fid=${file.id})}"><input type="button"
                                                                                     onclick="disp_prompt()"
                                                                                     value="打分"/></a>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>

</div>
</body>
<script type="text/javascript" th:src="@{/webjars/jquery/1.9.1/jquery.js}"></script>
<script type="text/javascript" th:src="@{/webjars/bootstrap/3.3.7/js/bootstrap.js}"></script>
<script type="text/javascript" th:src="@{/asserts/js/ready.min.js}"></script>
<script type="text/javascript">
    var basePath = /*[[${#httpServletRequest.getContextPath()}]]*/'ContextPath';

    function disp_prompt() {
        var score = prompt("请输入分数", "0.00");
        return score;
    }

</script>
</html>